import {HTTP} from "@/utils/http.ts";
import {useState, useEffect} from "react";

const useProductData = () => {
    const [productData, setProductData] = useState([])

    useEffect(() => {
        async function getProductData() {
            const res = await HTTP.get('/get_item')
            setProductData(res.data)
        }

        getProductData()
    }, [])

    return {productData}
}

export default useProductData